Error deploying Flask Application to Apache using WSGI - ImportError No module named pymysql

by: crishmania, 8 years ago


[wsgi:error] [pid 13482:tid 139865367148288] [client 192.168.134.92:37304]   File "/var/www/flaskApp/flaskApp/__init__.py", line 2, in <module>
[Fri Feb 03 04:20:33.744257 2017] [wsgi:error] [pid 13482:tid 139865367148288] [client 192.168.134.92:37304]     import pymysql as mariadb
[wsgi:error] [pid 13482:tid 139865367148288] [client 192.168.134.92:37304] ImportError: No module named pymysql

even it is fine working with python3 __init__.py but when i am running it on apache server i am getting error 500
with above error sir please help me



You must be logged in to post. Please login or register an account.



Any time you see something like "no module named xyz" it means you're either importing that module directly, or you're using something that wants to.

In any case, you want to install it.

Do pip install pymysql in terminal.


-Harrison 8 years ago

You must be logged in to post. Please login or register an account.